<%@page import="java.sql.SQLException"%>
<%@page import="projet.ExempleServlet"%>
<%@page import="classes_tables.Vol"%>
<%@page import="classes_tables.Pilote"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="projet.Traitement"%>
<%@page import="classes_tables.Avion"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Jsp Sql</title>
<% 

	
	Date date = new Date();

	List<Avion> avions=null;
	List<Pilote> pilotes=null;
	List<Vol> vols=null;
	
	Traitement t = new Traitement("root","");
	
	try{
		ResultSet res = t.execRequete("select * from avion");
		avions = ExempleServlet.creerAvions(res);
		
		ResultSet res1 = t.execRequete("select * from pilote");
		pilotes = ExempleServlet.creerPilotes(res1);
		
		ResultSet res2 = t.execRequete("select * from vol");
		vols = ExempleServlet.creerVols(res2);
	}
	catch(SQLException e){ e.printStackTrace();}

%>
</head>
<body> 

Test 
<br> Time = <%= date %>
<br> <%= avions.toString() %>
<br> <%= pilotes.toString() %>
<br> <%= vols.toString() %>


</body>
</html>